<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Binh
 * Date: 1/6/14
 * Time: 3:00 PM
 * To change this template use File | Settings | File Templates.
 */
?>
<div class="search" >
    <?php
    if(!($singers) and !($songs)){
    ?>
        <h2 id="listContent"><?php echo $error; ?></h2>
    <?php
    }
    else{
        if($singers){
    ?>
            <h3>Danh sách ca sĩ</h3>
            <ul id="listContent">
    <?php
                foreach($singers as $singer){
    ?>
                    <li class="aSinger">
                        <div class="singerName">
                            <a href="<?php echo Uri::create('singer/communication/').$singer['SINGER_ID']; ?>" >
                                <?php echo $singer['SINGER_NAME']; ?>
                            </a>
                        </div>
                        <div class="singerDes">
                            <a href="#" > <?php echo $singer['GENRE_NAME']; ?> </a> </div>
                    </li>
    <?php
                }
    ?>
            </ul>
    <?php
        }
        if($songs){
    ?>
            <h3> Danh sách bài hát</h3>
            <ul id="listContent">
    <?php
                foreach($songs as $song){
    ?>
                    <li class="aSong">
                        <div class="songName">
                            <?php echo Asset::img('home/songIcon.png');?>
                            <a href="<?php echo Uri::create('song/play_song/').$song['SONG_ID']; ?>" >
                                <?php echo $song['SONG_NAME']; ?>
                            </a>
                        </div>
                        <div class="singerName">
                            <?php echo Asset::img('home/micIcon.png');?>
                            <a href="<?php echo Uri::create('singer/communication/').$song['SINGER_ID']; ?>" >
                                <?php echo $song['SINGER_NAME']; ?>
                            </a>
                        </div>
                        <div class="View">
                            <?php echo Asset::img('home/headphoneIcon.png');?>
                            <?php echo $song['VIEW'];?>
                        </div>
                    </li>
    <?php
                }
    ?>
            </ul>
    <?php
        }
    }
    ?>
</div>